<!doctype html>
<html>
	<head>
		<meta charset="utf-8">
		<title>飞机大战</title>
	</head>

	<body>
		<div id="stage" style="margin: 0 auto; width: 480px; height: 650px; text-align: center; vertical-align: middle" >
			<canvas id="canvas" style="border:0px solid red;" width="480" height="650">
				不支持画板对象
			</canvas>
		</div>
		<script>
			//定义Car构造方法
			function Car() {

				this.car = "车";
				//在drive构造方法里定义无名构造方法
				this.drive = function() {
					alert("开" + this.car);
				};
			};

			var ncar = new Car();
			//调用drive方法
			ncar.drive();

		</script>
	</body>
</html>

